import { DisabledProps, PermissionProps, VisibleProps } from "@/components/Permission"
import { VNodeChild } from "vue"

/**
 * 接钮属性
 */
export interface GetanButtonProps extends PermissionProps, VisibleProps, DisabledProps {
    // 按钮名称
    title?: string
    // 按钮，默认在左边
    icon?: string | Component | (() => VNodeChild)
    // 按钮类型
    type?: "default" | "tertiary" | "primary" | "success" | "info" | "warning" | "error"
    // 是否显示为块级
    block?: boolean
    // 形状，默认为方块
    shape?: "circle" | "round"
    // 大小
    size?: "tiny" | "small" | "medium" | "large"
    // 渲染成什么标签，默认为 button
    tag?: string
    // 边框，默认为 true
    border?: "dashed" | "text"
    // 点击事件
    onClick?: (data: any, status: Ref<{ loading: boolean; disabled: boolean }>) => void
    // 点击时传递
    data?: any
}

export const defaultGetanButtonProps: GetanButtonProps = {}
